Public Member Functions |
| | stream_open ($path, $mode, $options, $opened_path) |
| | stream_close () |
| | stream_read ($count) |
| | stream_write ($data) |
| | stream_eof () |
| | stream_tell () |
| | stream_seek ($offset, $whence) |
| | stream_flush () |
| | stream_stat () |
| | unlink ($path) |
| | rename ($path_from, $path_to) |
| | mkdir ($path, $mode, $options) |
| | rmdir ($path, $options) |
| | dir_opendir ($path, $options) |
| | dir_readdir () |
| | dir_rewinddir () |
| | dir_closedir () |
| | url_stat ($path, $flags) |
Static Public Member Functions |
| static | register () |
| static | setRoot (vfsStreamContent $root) |
| static | getRoot () |
Data Fields |
| const | READ = 'r' |
| const | TRUNCATE = 'w' |
| const | APPEND = 'a' |
| const | WRITE = 'x' |
| const | READONLY = 0 |
| const | WRITEONLY = 1 |
| const | ALL = 2 |
Protected Member Functions |
| | getContent ($path) |
| | getContentOfType ($path, $type) |
| | splitPath ($path) |
| | resolvePath ($path) |
| | calculateMode ($mode, $extended) |
Protected Attributes |
|
| $mode |
|
| $content |
|
| $dir |
|
| $dirIterator |
Static Protected Attributes |
|
static | $registered = false |
|
static | $root |
Member Function Documentation
| calculateMode |
( |
$ |
mode, |
|
|
$ |
extended |
|
) |
| [protected] |
calculates the file mode
- Parameters:
-
| string | $mode | opening mode: r, w, a or x |
| bool | $extended | true if + was set with opening mode |
- Returns:
- int
closes directory
- Returns:
- bool
| dir_opendir |
( |
$ |
path, |
|
|
$ |
options |
|
) |
| |
opens a directory
- Parameters:
-
- Returns:
- bool
reads directory contents
- Returns:
- string
reset directory iteration
- Returns:
- bool
| getContent |
( |
$ |
path ) |
[protected] |
| getContentOfType |
( |
$ |
path, |
|
|
$ |
type |
|
) |
| [protected] |
returns content for given path but only when it is of given type
- Parameters:
-
- Returns:
- vfsStreamContent
| static getRoot |
( |
) |
[static] |
| mkdir |
( |
$ |
path, |
|
|
$ |
mode, |
|
|
$ |
options |
|
) |
| |
creates a new directory
- Parameters:
-
| string | $path | |
| int | $mode | |
| int | $options | |
- Returns:
- bool
| static register |
( |
) |
[static] |
method to register the stream wrapper
Please be aware that a call to this method will reset the root element to null. If the stream is already registered the method returns silently. If there is already another stream wrapper registered for the scheme used by vfsStream a vfsStreamException will be thrown.
- Exceptions:
-
| rename |
( |
$ |
path_from, |
|
|
$ |
path_to |
|
) |
| |
rename from one path to another
- Parameters:
-
| string | $path_from | |
| string | $path_to | |
- Returns:
- bool
- Author:
- Benoit Aubuchon
| resolvePath |
( |
$ |
path ) |
[protected] |
helper method to resolve a path from /foo/bar/. to /foo/bar
- Parameters:
-
- Returns:
- string
| rmdir |
( |
$ |
path, |
|
|
$ |
options |
|
) |
| |
removes a directory
- Parameters:
-
- Returns:
- bool
- Todo:
- consider $options with STREAM_MKDIR_RECURSIVE
sets the root content
- Parameters:
-
| splitPath |
( |
$ |
path ) |
[protected] |
splits path into its dirname and the basename
- Parameters:
-
- Returns:
- array
checks whether stream is at end of file
- Returns:
- bool
flushes unstored data into storage
- Returns:
- bool
| stream_open |
( |
$ |
path, |
|
|
$ |
mode, |
|
|
$ |
options, |
|
|
$ |
opened_path |
|
) |
| |
open the stream
- Parameters:
-
| string | $path | the path to open |
| string | $mode | mode for opening |
| string | $options | options for opening |
| string | $opened_path | full path that was actually opened |
- Returns:
- bool
read the stream up to $count bytes
- Parameters:
-
| int | $count | amount of bytes to read |
- Returns:
- string
| stream_seek |
( |
$ |
offset, |
|
|
$ |
whence |
|
) |
| |
seeks to the given offset
- Parameters:
-
- Returns:
- bool
returns status of stream
- Returns:
- array
returns the current position of the stream
- Returns:
- int
writes data into the stream
- Parameters:
-
- Returns:
- int amount of bytes written
remove the data under the given path
- Parameters:
-
- Returns:
- bool
| url_stat |
( |
$ |
path, |
|
|
$ |
flags |
|
) |
| |
returns status of url
- Parameters:
-
| string | $path | path of url to return status for |
| ? | $flags flags set by the stream API |
- Returns:
- array
Field Documentation
file mode: read and write
set file pointer to end, append new data
set file pointer to start, overwrite existing data
The documentation for this class was generated from the following file:
- /Applications/XAMPP/xamppfiles/lib/php/pear/vfsStream/vfsStreamWrapper.php